﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%= TempData["Message"]%>
    <div id="cactionbutton">
        <button type="button" id="btnRefesh" title="Làm mới" class="button refresh">
            Làm mới</button>
        <button type="button" id="btnDelete" title="Xóa" class="button delete">
            Xóa</button>
        <button type="button" id="btnAddNew" title="Tạo mới" class="button addnew">
            Tạo mới</button>
    </div>
    <div class="clist">
        <table id="list" class="scroll">
        </table>
        <div id="pager" class="scroll" style="text-align: center;">
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="PageTitle" runat="server">
    Quản lý bài viết
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        jQuery(document).ready(function () {
            //Add New
            $("#btnAddNew").click(function () {
                window.location = "/Administration/Article/Create";
            });
            // refresh button
            $("#btnRefesh").click(function () {
                window.location = "/Administration/Article";
            });
           
            // delete button           
            $("#btnDelete").click(function () {
                JS_LIB.deletes('#list', 'ID', '/Administration/Article/DeleteList');
            });
            jQuery("#list").jqGrid({
                url: '/Administration/Article/GetListJQGrid/',
                datatype: 'json',
                mtype: 'GET',
                colNames: ["Stt", "ID", "Tiêu đề", "URL Alias", "Chức năng"],
                colModel: [
                 { name: 'No', index: 'No', align: 'center', width: 20},
                                { name: 'ID', index: 'ID', align: 'center', width: 50,hidden: true},
                                { name: 'Title', index: 'FullName', align: 'left', width: 120, sortable: true },
                                { name: 'Alias', index: 'Gender', align: 'center', width: 100, sortable: false },
                                { name: 'Action', index: 'Action', editable: false, width: 42, align: 'center', sortable: false}],
                pager: jQuery('#pager'),
                rowList: [50, 100, 150, 200, 200],
                rows: 20,
                page: 1,
                sortname: 'ID',
                sortorder: 'asc',
                multiselect: true,
                viewrecords: true,
                width: 1200, height: "100%",
                imgpath: '/scripts/grid/themes/basic/images',
                loadui: 'block'
            });
        });
        </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ModuleName" runat="server">
    Quản lý bài viết
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="FunctionTitle" runat="server">
    Quản lý bài viết
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="LoginRoles" runat="server">
</asp:Content>
